﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LaughingDog.GameObjects;
using Microsoft.Xna.Framework;

namespace LaughingDog.Components.Shapes
{
    public class LineShape : Shape
    {
        private Vector2 mStart;
        private Vector2 mEnd;

        public Vector2 StartPoint { get { return mStart; } set { mStart = value; Create(); } }
        public Vector2 EndPoint { get { return mEnd; } set { mEnd = value; Create(); } }

        public LineShape(GameObject gameObject)
            : base(gameObject)
        {
        }

        private void Create()
        {
            ClearVectors();

            if(mStart != null)
                AddVector(mStart);

            if (mEnd != null)
                AddVector(mEnd);
        }
    }
}
